<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
   %>
<script src="<%=basePath%>JS/CourseInformation.js"></script>
<!--  从后台传过来的数据-->
<div class="none">
	<div id="currentPage">${page}</div>
	<div id="totalPages">${totoalPage}</div>
</div>
<!-- 页面内容 -->
<div class="Box" style="margin-top:15px;"  >
     <!-- 内容标题 -->
	<div class="Box-head Border" style="padding-left:25px;" >
		<label class="Labelstyle">课程信息管理</label>
	</div>
	<!-- 具体内容 -->
	<div class="Box-content"  style="padding:25px;">
		<table class="table table-hover table-striped table-bordered">

			<thead>
				<tr>
					<th width="35%">课程名称</th>
					<th width="35%">课程代码</th>
					<th width="30%">编辑</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach var="courseInfo" items="${courseInfo}">
					<tr>
						<td>${courseInfo.coname}</td>
						<td>${courseInfo.cocourseCode}</td>
                       <td><input type="button" data-toggle="modal" data-target="#changeCourse"   data-id=${courseInfo.cocourseCode} class="btn btn-info changeCourse" value="编辑">
                       <input type="button" class="btn btn-warning delete" data-id=${courseInfo.cocourseCode} value="删除">
                       </td>
                       
					</tr>
				</c:forEach>
			</tbody>
		</table>
		
		<div id="example" class="center"></div><!--  分页按钮的显示-->
		<div class="funxtion Box-head Border " style="padding-top:20px;padding-bottom:20px;margin-bottom:10px;">
			<div class="span4 offset1">
				<a href="#insertCourse" role="button"  class="btn btn-info" data-toggle="modal">新增课程</a>
			</div>
		</div>
	</div>

</div>
<script>


</script>
<!-- 修改课程信息 -->
<div id="changeCourse" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">课程信息</h3>
  </div>
  <div class="modal-body">
  <form class="form-horizontal">
			<div class="control-group">
				<label class="control-label" for="oldPassword" >课程名称</label>
				<div class="controls">
					<input type="text"  id="changeName" placeholder="课程">
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="inputPassword">课程代码</label>
				<div class="controls">
					<input type="text" id="changeCode" disabled="true" placeholder="课程代码">
				</div>
			</div>
		</form>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    <button class="btn btn-primary" id="changeCourse_btn" class="changeCourse_btn">Save changes</button>
  </div>
</div>
<script>

</script>

<!-- 新增课程信息 -->
<div id="insertCourse" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">课程信息</h3>
  </div>
  <div class="modal-body">
  <form class="form-horizontal">
			<div class="control-group">
				<label class="control-label" for="oldPassword" >课程名称</label>
				<div class="controls">
					<input type="text"  id="insertName" placeholder="课程名称">
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="Password">课程代码</label>
				<div class="controls">
					<input type="text" id="insertCode" placeholder="课程代码">
				</div>
			</div>
		</form>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    <button class="btn btn-primary" id="insertCourse_btn">Save changes</button>
  </div>
</div>
<script>

</script>
